﻿using System;

namespace CharArray
{
    class Program
    {
        static void Main(string[] args)
        {
            char[] nameLetters = new char[] { 'J', 'o', 'h', 'n' };

            for (int i = 0; i < nameLetters.Length; i++)
            {
                Console.Write(nameLetters[i]);
            }

            int[] squares = new int[100];

            for (int i = 1; i <= 100; i++)
            {
                squares[i - 1] = i * i;
            }

            long sum = 0;

            for (int i = 0; i < squares.Length; i++)
            {
                sum += squares[i];
            }

            float[] a = new float[] { 1f, 0.5f, 8.2f, 5.0f };
            float[] b = new float[] { 1.3f, 7.5f, -8.2f };

            int max = a.Length;
            int min = b.Length;

            if (b.Length > a.Length)
            {
                max = b.Length;
                min = a.Length;
            }

            float[] c = new float[max];

            for (int i = 0; i < min; i++)
            {
                c[i] = a[i] + b[i];
            }

            for (int i = min; i < max; i++)
            {
                if(a.Length > b.Length)
                {
                    c[i] = a[i];
                }
                else
                {
                    c[i] = b[i];
                }
            }

            Console.ReadKey();
        }
    }
}
